﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ImapactTenis;

namespace _4___Apresentação_Web
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var usuario = (Usuario)Session["USUARIO"];
            if (usuario == null)
                Response.Redirect("Default.aspx");

            Control ctrl = Page.LoadControl(ResolveUrl("~/Menus/"+usuario.TipoUsuario+"Menu.ascx"));
            spMenu.Controls.Add(ctrl);
        }
    }
}
